package com.cheer.dto;

import cn.hutool.core.date.DateUtil;
import com.cheer.vo.AdminVO;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

@Data
@Accessors(chain = true)
public class AdminPageDTO {

    private Long adminId;

    private String orgName;

    private String contactPerson;

    private String phone;

    private String backupAccount;

    private Date createTime;

    public AdminVO build() {
        AdminVO adminVO = new AdminVO();
        adminVO.setAdminId(adminId);
        adminVO.setOrgName(orgName);
        adminVO.setContactPerson(contactPerson);
        adminVO.setPhone(phone);
        adminVO.setBackupAccount(backupAccount);
        adminVO.setCreateTime(DateUtil.formatDateTime(createTime));
        return adminVO;
    }
}
